import {defineStore} from 'pinia'
import {useDynamicTitle} from "@/utils/dynamicTitle.ts";

const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || ''


const useSettingStore = defineStore('setting', {

    state: () => ({
        title: '',
        dynamicTitle: '',
        hasFixed: false,
        hasVisible: false
    }),
    actions: {
        // 设置网页标题
        setTitle(title) {
            this.title = title
            useDynamicTitle();
        }
    }
})


export default useSettingStore
